namespace SeataNet.Core.Exceptions
{
    /// <summary>
    /// Seata异常基类
    /// </summary>
    public abstract class SeataException : Exception
    {
        protected SeataException() : base()
        {
        }
        
        protected SeataException(string message) : base(message)
        {
        }
        
        protected SeataException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
    
    /// <summary>
    /// 事务异常
    /// </summary>
    public class TransactionException : SeataException
    {
        public TransactionException() : base()
        {
        }
        
        public TransactionException(string message) : base(message)
        {
        }
        
        public TransactionException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
    
    /// <summary>
    /// 事务超时异常
    /// </summary>
    public class TransactionTimeoutException : TransactionException
    {
        public TransactionTimeoutException() : base()
        {
        }
        
        public TransactionTimeoutException(string message) : base(message)
        {
        }
        
        public TransactionTimeoutException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
    
    /// <summary>
    /// 事务执行异常
    /// </summary>
    public class TransactionExecutionException : TransactionException
    {
        public TransactionExecutionException() : base()
        {
        }
        
        public TransactionExecutionException(string message) : base(message)
        {
        }
        
        public TransactionExecutionException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
    
    /// <summary>
    /// RPC异常
    /// </summary>
    public class RpcException : SeataException
    {
        public RpcException() : base()
        {
        }
        
        public RpcException(string message) : base(message)
        {
        }
        
        public RpcException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
    
    /// <summary>
    /// 配置异常
    /// </summary>
    public class ConfigurationException : SeataException
    {
        public ConfigurationException() : base()
        {
        }
        
        public ConfigurationException(string message) : base(message)
        {
        }
        
        public ConfigurationException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
}